package com.rxmvp.rxmvpdemo.contract.main;

import com.trello.rxlifecycle.components.ActivityLifecycleProvider;

import dagger.Module;
import dagger.Provides;

/**
 * 负责给MainActivity提供实例的module
 *
 * 作者： huangRZ on 2017/1/21. 15:04
 * 邮箱：917647409@qq.com
 */
@Module
public class MainModule {

    private MainContract.IView view;
    private ActivityLifecycleProvider mActivityProvider;

    public MainModule(MainContract.IView view, ActivityLifecycleProvider activityLifecycleProvider){
        this.view = view;
        this.mActivityProvider = activityLifecycleProvider;
    }

    @Provides
    public MainContract.IView getView(){
        return view;
    }

    @Provides
    public ActivityLifecycleProvider getActivityProvider(){
        return mActivityProvider;
    }

}
